Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add User-Specific Access Tests for Conversion Results (βœ“ Sandbox Passed) #12

Closed
wants to merge 7 commits into from

Conversation

sweep-ai[bot]
Copy link
Contributor

@sweep-ai sweep-ai bot commented Dec 7, 2023

PR Feedback (click)

  • πŸ‘ Sweep Did Well
  • πŸ‘Ž Sweep Needs Improvement

Description

This pull request adds user-specific access tests for conversion results in the test_clinical.py and test_download.py files. It simulates scenarios where a user tries to access their own conversion results or the results of another user. The server's response is checked to ensure that the appropriate access is granted or denied.

Summary

  • Updated import order in test_clinical.py to match the order in utils.py
  • Added test_conversion_results_access_by_other_user to test_clinical.py to simulate accessing conversion results of another user
  • Added test_conversion_results_access_by_owner to test_clinical.py to simulate accessing own conversion results
  • Added test_download_access_by_owner to test_download.py to simulate downloading own conversion results
  • Added test_download_access_by_other_user to test_download.py to simulate downloading results of another user
  • Updated test_download_results_clinical_data_not_found in test_download.py to include assertions for response status code and message
  • Added XML tags to format the pull request description

Fixes #11.


πŸŽ‰ Latest improvements to Sweep:

  • We just released a dashboard to track Sweep's progress on your issue in real-time, showing every stage of the process – from search to planning and coding.
  • Sweep uses OpenAI's latest Assistant API to plan code changes and modify code! This is 3x faster and significantly more reliable as it allows Sweep to edit code and validate the changes in tight iterations, the same way as a human would.

πŸ’‘ To get Sweep to edit this pull request, you can:

  • Comment below, and Sweep can edit the entire PR
  • Comment on a file, Sweep will only modify the commented file
  • Edit the original issue to get Sweep to recreate the PR from scratch

Copy link
Contributor Author

sweep-ai bot commented Dec 7, 2023

Sandbox Executions

  • Running GitHub Actions for convertPheno_server/tests/test_download.py βœ“
Check convertPheno_server/tests/test_download.py with contents:

Ran GitHub Actions for 912e624cc218b383cecc2f63c6af6b779476726d:

  • Running GitHub Actions for convertPheno_server/tests/test_clinical.py βœ“
Check convertPheno_server/tests/test_clinical.py with contents:

Ran GitHub Actions for 1f2834a8c9398f5e971c2a3829eb6e523e6e3c0c:

Copy link
Contributor Author

sweep-ai bot commented Dec 7, 2023

Apply Sweep Rules to your PR?

  • Apply: All new business logic should have corresponding unit tests.
  • Apply: Refactor large functions to be more modular.
  • Apply: Add docstrings to all functions and file headers.

@sweep-ai sweep-ai bot added the sweep Assigns Sweep to an issue or pull request. label Dec 7, 2023
@github-actions github-actions bot requested a review from IvoLeist December 7, 2023 22:38
@IvoLeist
Copy link
Member

IvoLeist commented Dec 8, 2023

Took inspiration by sweep's suggestion and the implemented it on my own πŸš€

@IvoLeist IvoLeist closed this Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sweep Assigns Sweep to an issue or pull request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sweep: Pytests if the conversion output can be accessed by another user
1 participant